package com.loong.order.model;

import com.loong.common.mybatis.entity.BaseEntity;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "order_item")
public class OrderItem extends BaseEntity {
    /**
     * 商品id
     */
    @Column(name = "goods_sku_id")
    private Long goodsSkuId;

    /**
     * 规格信息
     */
    private String specificationInfo;

    /**
     * 订单id
     */
    @Column(name = "order_id")
    private Long orderId;

    /**
     * 商品购买数量
     */
    private Integer num;

    /**
     * 商品名称
     */
    @Column(name = "goods_name")
    private String goodsName;

    /**
     * 商品单价
     */
    private BigDecimal price;

    /**
     * 商品总金额
     */
    @Column(name = "total_price")
    private BigDecimal totalPrice;

    /**
     * 商品图片地址
     */
    @Column(name = "picture_path")
    private String picturePath;
}